var n = getApp();

Page({
    data: {
        mine: {},
        carousels: [],
        projects: [],
        workers: [],
        appointmentLang: {}
    },
    onLoad: function(n) {
        this.setData({
            appointmentLang: wx.getStorageSync("yz_basic_info").lang.appointment
        }), this.getMine();
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {},
    toIndex: function() {
        wx.navigateTo({
            url: "/packageE/appointment/appointment_index"
        });
    },
    toList: function() {
        var n = JSON.stringify(this.data.appointmentLang);
        wx.navigateTo({
            url: "/packageE/appointment/ProjectList/ProjectList?appointmentLang=" + n
        });
    },
    toclient: function() {
        wx.navigateTo({
            url: "/packageE/appointment/client/project/project"
        });
    },
    toAppiontment: function() {
        wx.navigateTo({
            url: "/packageE/appointment/client/appointment/appointment"
        });
    },
    toStore: function() {
        wx.navigateTo({
            url: "/packageE/appointment/technician/appointment_project/appointment_project?name=store"
        });
    },
    noStore: function() {
        wx.navigateTo({
            url: "/packageE/appointment/technician/appointment_project/appointment_project"
        });
    },
    toStoreTec: function() {
        wx.navigateTo({
            url: "/packageE/appointment/manager/stores_technician/stores_technician?store_id=" + this.data.mine.store_id
        });
    },
    toextension: function() {
        wx.navigateTo({
            url: "/packageG/pages/member/extension/extension"
        });
    },
    toWorker: function() {
        wx.navigateTo({
            url: "/packageE/appointment/technician/work_day/TechnicianWork/TechnicianWork?worker_id=" + this.data.mine.worker_id
        });
    },
    getMine: function() {
        var t = this, e = n.getNetAddresss("plugin.appointment.frontend.member.get-info");
        n._getNetWork({
            url: e,
            data: {},
            success: function(n) {
                var e = n.data;
                1 == e.result ? t.setData({
                    mine: e.data
                }) : wx.showToast({
                    icon: "none",
                    title: e.msg,
                    duration: 1500
                });
            },
            fail: function(n) {
                console.log(n);
            }
        });
    }
});